Dynomotion

Group: DynoMotion Message: 7542 From: ricochetproducts Date: 5/28/2013
Subject: Help With C programming
Hey Guys, I have my retro wiring and mechanical done and I am beginning
to program. I have a question....
In the home "Simple Home 3 Axis" the example is shown like this


while (!ReadBit(10)) ; // loop until IO bit goes high

I have my limits connected to Opto In 136 - 141 they are NC will this work if I change (!ReadBit(10)) to (!ReadBit(136)) when the machine reaches the switch. The bit will go low. Will this still work?

or do I have the limits wired in the wrong place.

...Thanks, Steve
Group: DynoMotion Message: 7543 From: morgtod Date: 5/28/2013
Subject: Re: Help With C programming
Steve,
If you remove the "!" from (!ReadBit(10)) it will loop until low.

Todd


--- In DynoMotion@yahoogroups.com, "ricochetproducts" <steveklemp@...> wrote:
>
> Hey Guys, I have my retro wiring and mechanical done and I am beginning
> to program. I have a question....
> In the home "Simple Home 3 Axis" the example is shown like this
>
>
> while (!ReadBit(10)) ; // loop until IO bit goes high
>
> I have my limits connected to Opto In 136 - 141 they are NC will this work if I change (!ReadBit(10)) to (!ReadBit(136)) when the machine reaches the switch. The bit will go low. Will this still work?
>
> or do I have the limits wired in the wrong place.
>
> ...Thanks, Steve
>
Group: DynoMotion Message: 7544 From: Steve Klemp Date: 5/28/2013
Subject: Re: Help With C programming
Hi Todd,  Thank You very much!
 
.....Steve